/* 
 * This module contains the "layouter". The layouter is the program 
 * component of Towerhack which converts the abstract dungeon 
 * representation (Graph) into an actual tile-based map with rooms, 
 * corridors etc.
 * To implement its functionality, the layouter delegates tasks to the
 * modules dig and layout.
 */
#ifndef DUNGEON_H_
#define DUNGEON_H

#include "world/map.h"
#include "graph.h"

// Assert error if this number of traversals is ever exceeded
#define MAX_TRAVERSALS 4096

/*
 * Construct a dungeon Map from the given Graph. It is the 
 * responsibility of the caller to dispose of the generated Map
 * later via map_cleanup().
 * dungeon_width and dungeon_height are the size of one dungeon layer
 * in the dungeon to be generated. The number of layers is determined
 * as necessary when space for new segments is required.
 */
extern void dungeon_generate (Graph* g, Map* m, 
                              int dungeon_width, int dungeon_height);

#endif
